@extends('layout.master')

@section('content-header')
    <h1>Tamu</h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="{{ URL::route('tamus.index') }}"><i class="fa fa-user"></i> Tamu</a></li>
        <li class="active"><i class="fa fa-list"></i>Detail</li>
    </ol>
@stop

@section('content')

<style type="text/css">
	.table-responsive h4 {
		margin: 30px 0 10px 0 !important;
		padding: 15px;
		background-color: #f4f4f4;
		border-left: 5px solid #ddd;
	}
	.table-responsive h4:first-child {
		margin: 0 0 10px 0 !important;
	}
	.table-responsive .form-group {
		margin: 0 0 10px 0 !important;
	}
	.table-responsive dd {
		margin-top: 10px !important;
		margin-bottom: 10px !important;
		border-bottom: #ddd solid 1px;
	}
	.table-responsive .dd-button {
		margin-top: 25px !important;
		border-bottom: none;
	}
</style>

<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-body table-responsive">

				<h4>Data Tamu</h4>
				<div class="row">
					<div class="col-xs-5">
						<dl class="dl-horizontal">
							<dt class="form-group">No. KTP</dt>
							<dd>{{ $tamus->no_ktp }}</dd>
							
							<dt class="form-group">Nama</dt>
							<dd>{{ $tamus->nama }}</dd>

							<dt class="form-group">Jenis kelamin</dt>
							<dd>{{ $tamus->jenis_kelamin == 'L'? 'Laki-laki' : 'Perempuan'; }}</dd>
							
							<dt class="form-group">Golongan darah</dt>
							<dd>{{ $tamus->golongan_darah }}</dd>
							
							<dt class="form-group">Tempat lahir</dt>
							<dd>{{ $tamus->tempat_lahir }}</dd>
						</dl>
					</div>
					<div class="col-xs-7">
            			<dl class="dl-horizontal">
							<dt class="form-group">Agama</dt>
							<dd>{{ ($tamus->agama) ? $tamus->agama->nama : '-' }}</dd>
							
							<dt class="form-group">Jenis pekerjaan</dt>
							<dd>{{ ($tamus->jenisPekerjaan) ? $tamus->jenisPekerjaan->nama : '-' }}</dd>
							
							<dt class="form-group">Status kawin</dt>
							<dd class="capitalize-text">{{ $tamus->status_kawin }}</dd>
							
							<dt class="form-group">Alamat asal</dt>
							<dd>{{ $tamus->alamat }}</dd>
						</dl>
					</div>
				</div>

				<h4>Data Penduduk Penjamin</h4>
				<dl class="dl-horizontal">
					<dt class="form-group">Lokasi Penjamin</dt>
					<dd>{{ ($tamus->lokasi) ? $tamus->lokasi->nama : '-' }}</dd>
					
					<dt class="form-group">Penduduk Penjamin</dt>
					<dd>{{ ($tamus->penduduk) ? $tamus->penduduk->nama : '-' }}</dd>
				</dl>

				<h4>Detail</h4>
				<dl class="dl-horizontal">
					<dt class="form-group">Tanggal Lapor</dt>
					<dd>{{ $tamus->tanggal_lapor }}</dd>
					
					<dt class="form-group">Tanggal Berakhir</dt>
					<dd>{{ $tamus->tanggal_akhir }}</dd>

					<dt class="form-group">Alasan Tinggal</dt>
					<dd>{{ $tamus->alasan_tinggal }}</dd>
					
					<dd class="dd-button">
            			<a href="#" id="back" class="btn btn-primary"><i class="fa fa-arrow-circle-left"></i> Kembali</a>
					</dd>
            	</dl>
            </div><!-- /.box-body -->
        </div><!-- /.box -->
    </div>
</div>
@stop

@section('javascript')
<script type="text/javascript">
    $(function() {
    	$('.table-responsive').on('click', '#back', function(event) {
    		window.history.go(-1);
    		return false;
    	});
    });
</script>
@stop